<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text" id="i1" placeholder="姓名">
<input type="text" id="i2" placeholder="工资">
<input type="text" id="i3" placeholder="工作">
<input type="button" value="添加" onclick="f()">
<table border="1">
  <tr>
    <th>姓名</th>
    <th>工资</th>
    <th >工作</th>
  </tr>
  <script>
    let table = document.querySelector("table");
    function f() {
      let tr  = document.createElement("tr");
      let name  = document.createElement("th");
      let wages = document.createElement("th");
      let work  = document.createElement("th");
      name.innerText = i1.value;
      wages.innerText=i2.value;
      work.innerText =i3.value;
      tr.append(name,wages,work);
      table.append(tr);

    }
  </script>
</table>

</body>
</html>